﻿@using NotesVaultOnline.Class.Helper;

@using (Html.BeginForm("Add", "Note"))
{ }

<div class="modal hide novo-modal" id="modalAddNote" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h4>Add new Note</h4>
    </div>
    <div class="modal-body">
        <div class="clearfix">
            <label class="thick pull-left">Title</label><span class="label label-important pull-right"></span>
        </div>
        <input class="btn-block" type="text" placeholder="Your note title here..." data-bind="value: Title" />
        <label class="thick">Content</label>
        <textarea id="txtContent" class="btn-block" rows="12" placeholder="Your note content here..." data-bind="value: Content"></textarea>
        <div id="lnkAttach" class="btn btn-small" rel="popover"
            data-content="<button onclick='javascript:browseFile();' class='btn btn-block btn-primary'>File</button><button onclick='javascript:promptLink()' class='btn btn-block btn-primary'>Link</button>">
            <i class="icon-plus-sign"></i><span class="pad-left">More</span>
        </div>
        <div id="addNoteAttachmentList" class="table-container">
            <table class="table table-hover table-condensed">
                <tbody data-bind="foreach: Attachments">
                    <tr data-bind="click: $root.removeAttachment">
                        <td><span data-bind="text: Url" /></td>
                        <td><span class="label pull-right">Click to remove</span></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="modal-footer clearfix">
        <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
        <button id="btnSaveNote" class="btn btn-primary">Save Note</button>
    </div>
</div>

@Scripts.Render("~/Scripts/knockout")
@Scripts.Render("~/Scripts/novo-data")
@Html.RenderCustomScript("AddNote.js", NovoHtmlHelper.ScriptType.Partials)
